@import '../../../assets/styles/variable.scss';

input {
  outline: none;
}

a {
  color: black;
  text-decoration: none;
}

.container {
  display: flex;
  width: 100%;
  height: 50px;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 5px $alpha-black;
  position: sticky;
  top: 0;
  padding: 5px 20px;
  background: #FFFFFF;
  z-index: 100;

  .searchBox {
    position: relative;

    .searchBtn {
      position: absolute;
    }
  }
}

@media screen and (min-width: 400px) {
  .container {
    .logo {
      height: 40px;
    }

    .homepage, .consultMenu, .provService {
      font-size: map-get($map: $common, $key: 'searchbar-font-1-pc');
      padding: 3px;
      cursor: pointer;
    }

    .homepage:hover, .consultMenu:hover, .provService:hover {
      color: $theme-color;
      font-weight: bold;
    }

    .dropdown {
      position: relative;
      display: inline-block;

      .menu {
        display: none;
        position: absolute;
        width: 172px;
        padding-top: 10px;
        z-index: 100;
        text-align: center;
        background-color: white;

        p {
          font-size: map-get($map: $common, $key: 'searchbar-font-1-pc');
          margin-bottom: 0;
          padding: 10px 0;
          cursor: pointer;
        }

        p:hover {
          font-weight: bold;
          color: $theme-color;
        }
      }
    }

    .dropdown:hover .menu {
      display: block;
    }

    .searchBox {
      width: 21%;

      .searchInput {
        width: 100%;
        height: 40px;
        border: 2px solid $theme_color;
        border-radius: 20px;
        padding-left: 20px;
        font-size: map-get($map: $common, $key: 'searchbar-font-2-pc');
      }

      .searchBtn {
        width: 27px;
        right: 20px;
        top: 7.5px;
        cursor: pointer;
      }
    }
  }
}

@media screen and (max-width: 400px) {
  .container {
    height: 45px;
    width: 380px;

    .logo {
      height: 29px;
      width: 90px
    }

    .homepage:hover, .consultMenu:hover, .provService:hover {
      color: $theme-color;
      font-weight: bold;
    }

    .dropdown {
      position: relative;
      display: inline-block;

      .menu {
        display: none;
        position: absolute;
        width: 120px;
        padding-top: 5px;
        z-index: 100;
        text-align: center;
        background-color: white;

        p {
          font-size: map-get($map: $common, $key: 'searchbar-font-1-pc');
          margin-bottom: 0;
          padding: 10px 0;
          cursor: pointer;
        }

        p:hover {
          font-weight: bold;
          color: $theme-color;
        }
      }
    }

    .dropdown:hover .menu {
      display: block;
    }

    .searchBox {
      .searchInput {
        width: 117px;
        height: 27px;
        border: 1px solid $theme-color;
        border-radius: 7px;
        padding-left: 25px;
        font-size: map-get($map: $common, $key: 'searchbar-font-2-mb');
      }

      .searchBtn {
        width: 17px;
        right: 10px;
        top: 5px;
      }
    }
  }
}
